package com.example.ribbon.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.example.config.ribbon.ServiceCaller;
import com.example.ribbon.Constant;
import com.example.ribbon.service.NodeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;

@Service
public class NodeServiceImpl implements NodeService {

    @Autowired
    @Lazy
    ServiceCaller serviceCaller;

    @Override
    public JSONObject testInfo(String serviceName) {
        return serviceCaller.get(serviceName,Constant.TEST_INF,JSONObject.class);
    }
}
